home *** CD-ROM | disk | FTP | other *** search
-
-
- /*
- * An implementation of the Standard C library function memcmp.
- */
- int memcmp(const void *s1, const void *s2, size_t n)
- {
- const unsigned char *t1 = s1;
- const unsigned char *t2 = s2;
- size_t i;
-
- for (i = 0; i < n; ++i)
- if (t1[i] != t2[i])
- return t1[i] - t2[i];
- return 0;
- }
-
-